--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
docs/en/rns-link-api.md 69c9f13de7a2a54b2cbab30db51b9d1d18a4400a (69c9f13d) Text, 3.96 KB
Generic RNS Link API
MeshChatX exposes a generic Reticulum Link transport over the main WebSocket (T383838/ws) so external apps and plugins can open links, run request/response exchanges, send packets, and tear links down without going through NomadNet-specific helpers.
This is the surface used by microReticulum management consoles that treat MeshChatX as an RNS transport.
Auth
When password auth is enabled, all T383838rns.link.* client messages require an authenticated session (same rule as other WebSocket mutators).
Client → server
┌───────────────────┬────────────────────────────────────────────────────────────────────────┬─────┐
│ `BT383838`Fdddtype`f`b │ Fields │ Be… │
├───────────────────┼────────────────────────────────────────────────────────────────────────┼─────┤
│ T383838rns.link.open │ T383838destination_hash (hex), T383838aspect (dot-separated), T383838request_id, T383838auto_iden… │ Op… │
│ T383838rns.link.identify │ T383838destination_hash, T383838aspect, T383838request_id │ Ca… │
│ T383838rns.link.request │ T383838destination_hash, T383838aspect, T383838path, T383838request_id, T383838data_b64?, T383838timeout? │ En… │
│ T383838rns.link.send │ T383838destination_hash, T383838aspect, T383838payload_b64, T383838request_id │ Se… │
│ T383838rns.link.close │ T383838destination_hash, T383838aspect, T383838request_id │ Te… │
└───────────────────┴────────────────────────────────────────────────────────────────────────┴─────┘
T383838aspect is split on T383838. into RNS app name + sub-aspects (for example T383838microrn.mgmt).
Long-running T383838open / T383838request work is tracked per WebSocket client and cancelled when that client disconnects.
Server → client
Per-T383838request_id replies reuse the same T383838type with T383838status of T383838phase, T383838progress, T383838success, or T383838failure.
Broadcast events:
┌────────────────┬─────────────────┬──────────────────────┐
│ `BT383838`Fdddtype`f`b │ `BT383838`Fdddevent`f`b │ Notes │
├────────────────┼─────────────────┼──────────────────────┤
│ T383838rns.link.event │ T383838packet_received │ Includes T383838payload_b64 │
│ T383838rns.link.event │ T383838link_closed │ Cached link removed │
└────────────────┴─────────────────┴──────────────────────┘
Plugin capabilities
Plugins that declare the matching T383838permissions.managers entries can call the same transport through T383838POST /api/v1/plugins/{id}/invoke with T383838method: "callManager":
• T383838rnsLink.open
• T383838rnsLink.identify
• T383838rnsLink.request
• T383838rnsLink.send
• T383838rnsLink.close
Subscribe to async link traffic with T383838permissions.hooks: ["rns.link.event"]. Events arrive as T383838plugin.event WebSocket frames with T383838event: "rns.link.event".
Example manifest fragment:
T282828
Tb4b4b4{
Tff7b72"permissions"Tb4b4b4: Tb4b4b4{
Tff7b72"hooks"Tb4b4b4: Tb4b4b4[Ta5d6ff"rns.link.event"Tb4b4b4],
Tff7b72"managers"Tb4b4b4: Tb4b4b4[Ta5d6ff"rnsLink.open"Tb4b4b4, Ta5d6ff"rnsLink.identify"Tb4b4b4, Ta5d6ff"rnsLink.request"Tb4b4b4, Ta5d6ff"rnsLink.send"Tb4b4b4, Ta5d6ff"rnsLink.close"Tb4b4b4],
Tff7b72"storage"Tb4b4b4: Ta5d6ff"isolated"Tb4b4b4,
Tff7b72"network"Tb4b4b4: Ta5d6ff"none"
Tb4b4b4}
Tb4b4b4}
Implementation
• T383838meshchatx/src/backend/rns_link_manager.py — link cache, open/identify/request/send/close
• T383838meshchatx/meshchat.py — WebSocket dispatch and per-client task tracking
• T383838meshchatx/src/backend/plugin_manager.py — capability wrappers and hook fan-out
Related
• Plugins in Tools docs for install/enable flow
• Architecture for the plugin runtime overview
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────